package com.tinyseed.emcp.api;

import com.tinyseed.emcp.api.basicdata.repository.EnterpriseRepository;
import com.tinyseed.hmxx.common.utils.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.Resource;
import javax.sql.DataSource;

/**
 * 版权所有 © Copyright 2019<br>
 *
 * @Description: <br>
 * @CreateDate: Created in 2019/10/29 01:03 <br>
 * @Author: Simon.Yu
 * @Modify:
 */
@EnableAsync
@SpringBootApplication(scanBasePackages = "com.tinyseed")
@EnableSwagger2
@EnableScheduling
@EnableJpaAuditing
@EnableTransactionManagement
@EnableCaching
@Slf4j
public class EmcpApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(EmcpApplication.class, args);
        SpringUtil.setApplicationContext(context);
    }
}
